<template>
  <el-container :style="{ height: screenHeight }">
    <el-aside width="200px">
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
      >
        <el-submenu index="1">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>初审阶段</span>
          </template>

          <el-menu-item index="1-1">办理初审</el-menu-item>
          <el-menu-item index="1-2">查询审核</el-menu-item>
        </el-submenu>

        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>产品管理</span>
          </template>

          <el-menu-item index="2-1"><router-link to="/AddLoan">上传产品</router-link></el-menu-item>
          <el-menu-item index="2-2">产品管理</el-menu-item>
        </el-submenu>

        <el-submenu index="3">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>复审管理</span>
          </template>

          <el-menu-item index="3-1">复审办理</el-menu-item>
          <el-menu-item index="3-2">查询审核</el-menu-item>
        </el-submenu>

        <el-submenu index="4">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>贷后管理</span>
          </template>

          <el-menu-item index="4-1">合同管理</el-menu-item>
          <el-menu-item index="4-2">逾期管理</el-menu-item>
        </el-submenu>

        <el-submenu index="5">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>企业管理</span>
          </template>

          <el-menu-item index="5-1"><router-link to="/EmpManager">员工管理</router-link></el-menu-item>
          <el-menu-item index="5-2"><router-link to="/ManageRepay">业绩管理</router-link></el-menu-item>
          <el-menu-item index="5-3"><router-link to="/ProductShenhe">产品管理</router-link></el-menu-item>
        </el-submenu>
      </el-menu></el-aside
    >
    <el-container>

      <el-header>金融借贷项目后台管理</el-header>
      <el-main><router-view></router-view></el-main>

    </el-container>
  </el-container>
</template>

<script>
export default {
  data() {
    return {
      screenHeight: document.documentElement.clientHeight + "px",
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>
<style>
.el-header {
  background-color: #ffffff;
  color: rgb(100, 100, 100);

  text-align: center;
  line-height: 60px;
  height: auto;
}

.el-aside {
  background-color: #ffffff;
  color: rgb(255, 252, 252);
  text-align: center;
  line-height: 200px;
  height: auto;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
  height: auto;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
  height: auto;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
  height: auto;
}
</style>